package DBTasks;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

public class PetInformation extends DBTask {
	
	private static ArrayList<String> idList;

	public static ArrayList<String> listPetInfo(String shelterName) {
		
		PreparedStatement idStatement;
		
		try {
			
			idStatement = con.prepareStatement("select Pet_ID from Pet where Shelter_Name = ?");
			idStatement.setString(1, shelterName);
		    ResultSet rsID = idStatement.executeQuery();
		    
			idList = new ArrayList<String>();
			while(rsID.next()){
				idList.add(rsID.getString(1));
			}
			
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return idList;

	}


}
